package com.idanchuang.component.just.web.config;

import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 自定义 WebMvcConfigurer 配置
 *
 * @author yjy
 * 2018-04-23 11:40
 */
public class ComWebMvcConfig implements WebMvcConfigurer {

    /**
     * 静态资源请求配置
     * @param registry 资源处理注册器
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/common/**").addResourceLocations("classpath:/common/");
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
    }

}
